package org.fisco.bcos.evidence.gateway.config;

public enum ResultCode {

    SUCCESS("200", "成功"),
    BAD_REQUEST("400", "参数或语法有误"),
    UNAUTHORIZED("401", "认证失败"),
    SERVER_ERROR("500", "服务器内部错误"),
    CryptoException("501", "请求失败:文件证书异常"),
    InvalidArgumentException("502", "请求失败:无效的参数"),
    NoSuchAlgorithmException("503", "请求失败:算法异常"),
    TransactionException("504", "请求失败:请求事务异常"),
    ProposalException("506", "请求失败:提案异常"),
    InterruptedException("507", "请求失败:被打断"),
    ExecutionException("508", "请求失败:执行异常"),
    OrdererSizeException("509", "没有足够的背书节点"),


    IOException("510", "IO异常"),
    ClassNotFoundException("511", "文件不存在"),
    StoreIOKeyException("512", "无法从文件加载键值"),
    PEMException("513", "读取私钥发生异常"),
    CreateCaClientException("514", "创建CA客户端发生异常"),
    EnrollException("515", "登记失败"),
    RegisterException("516", "注册失败"),
    CRLException("517", "证书已被吊销"),
    TimeOutException("518", "证书已过期"),
    VerifyFailure("519", "验签失败"),
    SignFailure("520", "加签失败"),
    ExamineCheckFailed("521", "您上链文本不合规"),

    UpBlockchainException("530", "上链失败."),
    UpAccountBlockchainException("531", "账户上链失败."),
    UpEvidenceBlockchainException("532", "存证上链失败.");

    private String code;
    private String msg;

    ResultCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
